package com.Rendering.UI.GameMainMenu;


import com.core.Window.Main.Game;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.SceneAntialiasing;
import javafx.scene.layout.Pane;

import java.io.IOException;
import java.util.Objects;

public class GameMainMenu {
    private final Parent root =new Pane();
    private final Scene scene =new Scene(root,1440,900,true,SceneAntialiasing.BALANCED);


    public void loadMainMenu() {
        try {
            //节点
            Parent root = FXMLLoader.load(Objects.requireNonNull(GameMainMenu.class.getResource("/Fxml/GameMainMenu.fxml")));

            scene.setRoot(root);
            Game.getStage().setScene(scene);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
